<div class="pr">
  <div class="layout-left">
    <div class="prompt-info">
      <span class="tab-nav" [ngClass]="{'active': status === '新建拼团'}" (click)="choseType('新建拼团')">新建拼团</span><span
      class="tab-nav" [ngClass]="{'active': status === '未开始'}" (click)="choseType('未开始')">未开始</span><span
      class="tab-nav" [ngClass]="{'active': status === '进行中'}" (click)="choseType('进行中')">进行中</span><span
      class="tab-nav no_extra" [ngClass]="{'active': status === '已结束'}" (click)="choseType('已结束')">已结束</span>
    </div>
    <div *ngIf="!isEditSpell">
      <div *ngIf="status === '新建拼团'">
        <!--<div class="loading pr-control" [hidden]="!loadingShow">-->
        <!--<app-loading></app-loading>-->
        <!--</div>-->
        <!--<table class="table create-table" *ngIf="!loadingShow">-->
        <!--<thead>-->
        <!--<tr>-->
        <!--<th>商品</th>-->
        <!--<th>价格</th>-->
        <!--<th>操作</th>-->
        <!--</tr>-->
        <!--</thead>-->
        <!--<tbody>-->
        <!--<tr *ngFor="let item of goodsList">-->
        <!--<td><img src="{{item.first_picture?aliyunOssOutputUrl+'/'+item.first_picture:''}}" alt=""><span class="name-omit">{{item.name}}</span>-->
        <!--</td>-->
        <!--<td>￥ {{item.price/1000}}</td>-->
        <!--<td><a href="javascript:;" (click)="createSpellDialog(item.id,item.norm_mode)">新建</a></td>-->
        <!--</tr>-->
        <!--</tbody>-->
        <!--</table>-->
        <!--<div class="text-center pr-control" [hidden]="loadingShow">-->
        <!--<pagination (pageChanged)="pageChanged($event)" [totalItems]="totalItems" [itemsPerPage]="itemsPerPage" [(ngModel)]="currentPage" [maxSize]="5"-->
        <!--previousText="&lsaquo;" nextText="&rsaquo;" firstText="&laquo;" lastText="&raquo;" [boundaryLinks]="true" class="pagination-sm"></pagination>-->
        <!--</div>-->
        <form #createSpellForm="ngForm">
          <div class="module">
            <div class="line">
              <div class="title">活动名称</div>
              <div class="content">
                <input type="text" class="form-control input-width" name="activity_name" [(ngModel)]="createSpell.name" required>
              </div>
            </div>
            <div class="line">
              <div class="title">商品设置</div>
              <div class="content">
                <div class="sec-line">
                  <div class="sec-title">商品 :</div>
                  <div class="sec-content" *ngIf="!checkedGood">
                    <a href="javascript:;" class="add-goods" (click)="addGoodsModal.show();">
                      <i class="iconfont icon-add"></i>添加商品
                    </a>
                  </div>
                  <div class="sec-content" *ngIf="!!checkedGood">
                    <a href="javascript:;" class="add-goods" (click)="addGoodsModal.show();">
                      <img src="{{checkedGood?aliyunOssOutputUrl+'/'+checkedGood.first_picture:''}}" alt="">
                      <span>{{checkedGood?.name}}</span>
                    </a>
                  </div>
                </div>
                <div class="sec-line">
                  <div class="sec-title">规格 :</div>
                  <div class="sec-content">
                  <span class="sku" *ngFor="let item of goodsSku" title="{{item.describe||item.name}}">
                    <input type="checkbox" name="sku" [(ngModel)]="item.selected">
                    <span class="sku_omit" title="{{item.name||item.describe}}">{{item.name||item.describe}}</span>
                    <input type="number" name="stock[{{item.id}}]" class="form-control input-control" value="{{item.in_stock}}" max="{{item.in_stock}}" disabled>
                  </span>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="module">
            <div class="line">
              <div class="title">参团条件设置</div>
              <div class="content">
                <div class="sec-line">
                  <div class="sec-inline">
                    <div class="sec-inline-title">成团人数</div>
                    <div class="sec-inline-content"><input type="number" class="form-control" name="num" [(ngModel)]="addActivityGoods.number" required></div>
                  </div>
                  <div class="sec-inline">
                    <div class="sec-inline-title">参团价格</div>
                    <div class="sec-inline-content"><input type="text" class="form-control" name="price" [(ngModel)]="activity_price"></div>
                  </div>
                  <div class="sec-inline">
                    <div class="sec-inline-title">开团次数</div>
                    <div class="sec-inline-content"><input type="number" class="form-control" name="round" min="0" [(ngModel)]="addActivityGoods.round" required></div>
                  </div><br>
                  <div class="sec-inline">
                    <input type="checkbox" [checked]="addActivityGoods.new_offer" (change)="checkedNew('new_offer')" id="isNew" disabled><label for="isNew">是否新人参团</label>
                  </div>
                  <div class="sec-inline" style="display: none">
                    <input type="checkbox" [checked]="addActivityGoods.new_open_group" (change)="checkedNew('new_open_group')" id="isNewOpen"><label for="isNewOpen">是否新人开团</label>
                  </div>
                </div>
              </div>
            </div>
            <div class="line">
              <div class="title">有效期限</div>
              <div class="content">
                <div class="sec-line">
                  <div class="sec-inline width-control">
                    <div class="sec-inline-title">开始时间</div>
                    <div class="sec-inline-content"><input type="date" class="form-control" name="startTime" placeholder="{{curDate}}" [(ngModel)]="createSpell.start_date" min="{{curDate}}" required></div>
                  </div>
                  <div class="sec-inline width-control">
                    <div class="sec-inline-title">结束时间</div>
                    <div class="sec-inline-content"><input type="date" class="form-control" name="endTime" placeholder="{{curDate}}" [(ngModel)]="createSpell.end_date" min="{{curDate}}" required></div>
                  </div>
                </div>
              </div>
            </div>
            <div class="line">
              <div class="title">拼团有效期限</div>
              <div class="content">
                <div class="sec-line">
                  <div class="sec-inline">
                    <div class="sec-inline-title">
                      <input type="text" class="form-control input-width" name="validTime" value="24小时" disabled>
                      <span class="prompt">（团长开团以后，在此有效期内，若组团失败，团员支付的钱，需退回）</span>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </form>
        <div class="text-center">
          <button class="btn btn-default" [disabled]="!createSpellForm.form.valid||!canClick" (click)="addOrdinarySpell()">确 定</button>
          <button class="btn btn-default" (click)="createSpellForm.form.reset();">重 置</button>
        </div>
      </div>
      <div *ngIf="status === '未开始'">
        <table class="table">
          <thead>
          <tr>
            <th>活动名称</th>
            <th>商品</th>
            <th>成团人数</th>
            <th>价格</th>
            <th>时间段</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let item of activityList">
            <td>{{item.name}}</td>
            <td>
              <img src="{{aliyunOssOutputUrl+'/'+item.activity_goods[0].goods.first_picture}}" alt="">
              <span class="goods-name">
              <span class="goods-name-omit" title="{{item.name}}">{{item.activity_goods[0].goods_name}}</span>
            </span>
            </td>
            <td>{{item.activity_goods[0].number}}</td>
            <td>{{item.activity_goods[0].activity_goods_sku[0]?.price/1000||0}}</td>
            <td>{{item.start_date}}至<br>{{item.end_date}}</td>
            <td>
              <a href="javascript:;" (click)="editSpellDialog(item)">编辑</a>
              <a href="javascript:;" (click)="delSpell(item.id)">删除</a>
            </td>
          </tr>
          </tbody>
        </table>
        <div class="text-center">
          <pagination (pageChanged)="pageChanged($event)" [totalItems]="totalItems" [itemsPerPage]="itemsPerPage" [(ngModel)]="currentPage" [maxSize]="5"
                      previousText="&lsaquo;" nextText="&rsaquo;" firstText="&laquo;" lastText="&raquo;" [boundaryLinks]="true" class="pagination-sm"></pagination>
        </div>
      </div>
      <div *ngIf="status === '进行中'">
        <table class="table">
          <thead>
          <tr>
            <th>活动名称</th>
            <th>商品</th>
            <th>成团人数</th>
            <th>价格</th>
            <th>分享次数</th>
            <th>参团人数</th>
            <th>成团个数</th>
            <th>时间段</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let item of activityList">
            <td>{{item.name}}</td>
            <td>
              <img src="{{aliyunOssOutputUrl+'/'+item.activity_goods[0].goods.first_picture}}" alt="">
              <span class="goods-name">
              <span class="goods-name-omit" title="{{item.name}}">{{item.activity_goods[0].goods_name}}</span>
            </span>
            </td>
            <td>{{item.activity_goods[0].number}}</td>
            <td>{{item.activity_goods[0].activity_goods_sku[0]?.price/1000||0}}</td>
            <td>{{item.activity_report?.activity_share_num||0}}</td>
            <td>{{item.activity_report?.activity_member_num||0}}</td>
            <td>{{item.shopping_info.over||0}}</td>
            <td>{{item.start_date}}至<br>{{item.end_date}}</td>
            <td>
              <a href="javascript:;" (click)="editSpellDialog(item)">编辑</a>
              <a *ngIf="item.status === '暂停'" href="javascript:;" (click)="changeStatus(item)">正常</a>
              <a *ngIf="item.status === '正常'" href="javascript:;" (click)="changeStatus(item)">暂停</a>
            </td>
          </tr>
          </tbody>
        </table>
        <div class="text-center">
          <pagination (pageChanged)="pageChanged($event)" [totalItems]="totalItems" [itemsPerPage]="itemsPerPage" [(ngModel)]="currentPage" [maxSize]="5"
                      previousText="&lsaquo;" nextText="&rsaquo;" firstText="&laquo;" lastText="&raquo;" [boundaryLinks]="true" class="pagination-sm"></pagination>
        </div>
      </div>
      <div *ngIf="status === '已结束'">
        <table class="table">
          <thead>
          <tr>
            <th>活动名称</th>
            <th>商品</th>
            <th>成团人数</th>
            <th>价格</th>
            <th>拼团总销量</th>
            <th>分享次数</th>
            <th>参团人数</th>
            <th>成功团数</th>
            <th>失败团数</th>
            <th>时间段</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let item of activityList">
            <td>{{item.name}}</td>
            <td>
              <img src="{{aliyunOssOutputUrl+'/'+item.activity_goods[0].goods.first_picture}}" alt="">
              <span class="goods-name">
              <span class="goods-name-omit" title="{{item.name}}">{{item.activity_goods[0].goods_name}}</span>
            </span>
            </td>
            <td>{{item.activity_goods[0].number}}</td>
            <td>{{item.activity_goods[0].activity_goods_sku[0]?.price/1000||0}}</td>
            <td>{{item.activity_report?.activity_sale_numshopping_info}}</td>
            <td>{{item.activity_report?.activity_share_num||0}}</td>
            <td>{{item.activity_report?.activity_member_num||0}}</td>
            <td>{{item.shopping_info.over||0}}</td>
            <td>{{item.shopping_info.dead||0}}</td>
            <td>{{item.start_date}}至<br>{{item.end_date}}</td>
            <td>
              <a href="javascript:;" (click)="createSpellAgain(item)">重新开团</a>
            </td>
          </tr>
          </tbody>
        </table>
        <div class="text-center">
          <pagination (pageChanged)="pageChanged($event)" [totalItems]="totalItems" [itemsPerPage]="itemsPerPage" [(ngModel)]="currentPage"
                      previousText="&lsaquo;" nextText="&rsaquo;" firstText="&laquo;" lastText="&raquo;" [boundaryLinks]="true" class="pagination-sm"></pagination>
        </div>
      </div>
    </div>

    <div *ngIf="isEditSpell">
      <div class="edit-red"><i class="iconfont icon-jinggao"></i>此页面可进行编辑</div>
      <form #editSpellForm="ngForm">
        <div class="module">
          <div class="line">
            <div class="title">活动名称</div>
            <div class="content">
              <input type="text" class="form-control input-width" name="activity_name" *ngIf="status == '未开始'" [(ngModel)]="editSpell.name" required>
              <input type="text" class="form-control input-width" name="activity_name" *ngIf="status == '进行中'" [(ngModel)]="editSpell.name" disabled>
            </div>
          </div>
          <div class="line">
            <div class="title">商品设置</div>
            <div class="content">
              <div class="sec-line">
                <div class="sec-title">商品 :</div>
                <div class="sec-content" *ngIf="!editCheckedGoods">
                  <a href="javascript:;" class="add-goods" (click)="addGoodsModal.show();">
                    <i class="iconfont icon-add"></i>添加商品
                  </a>
                </div>
                <div class="sec-content" *ngIf="!!editCheckedGoods">
                  <a href="javascript:;" class="add-goods" *ngIf="status == '未开始'" (click)="addGoodsModal.show();">
                    <img src="{{editCheckedGoods?aliyunOssOutputUrl+'/'+editCheckedGoods.first_picture:''}}" alt="">
                    <span>{{editCheckedGoods?.name}}</span>
                  </a>
                  <a href="javascript:;" class="add-goods" *ngIf="status == '进行中'">
                    <img src="{{editCheckedGoods?aliyunOssOutputUrl+'/'+editCheckedGoods.first_picture:''}}" alt="">
                    <span>{{editCheckedGoods?.name}}</span>
                  </a>
                </div>
              </div>
              <div class="sec-line">
                <div class="sec-title">规格 :</div>
                <div class="sec-content" *ngIf="status == '未开始'">
                  <span class="sku" *ngFor="let item of goodsSku" title="{{item.describe||item.name}}">
                    <input type="checkbox" name="sku{{item.id}}" [(ngModel)]="item.selected" [checked]="item.selected">
                    <span class="sku_omit" title="{{item.name||item.describe}}">{{item.name||item.describe}}</span>
                    <input type="number" name="stock[{{item.id}}]" class="form-control input-control" value="{{item.in_stock}}" max="{{item.in_stock}}" disabled>
                  </span>
                </div>
                <div class="sec-content" *ngIf="status == '进行中'">
                  <span class="sku" *ngFor="let item of goodsSku" title="{{item.describe||item.name}}">
                    <input type="checkbox" name="sku{{item.id}}" [(ngModel)]="item.selected" [checked]="item.selected" disabled>
                    <span class="sku_omit" title="{{item.name||item.describe}}">{{item.selected}}{{item.name||item.describe}}</span>
                    <input type="number" name="stock[{{item.id}}]" class="form-control input-control" value="{{item.in_stock}}" max="{{item.in_stock}}" disabled>
                  </span>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="module">
          <div class="line">
            <div class="title">参团条件设置</div>
            <div class="content">
              <div class="sec-line">
                <div class="sec-inline">
                  <div class="sec-inline-title">成团人数</div>
                  <div class="sec-inline-content" *ngIf="status == '未开始'"><input type="number" class="form-control" name="num" [(ngModel)]="editGoods.number" required></div>
                  <div class="sec-inline-content" *ngIf="status == '进行中'"><input type="number" class="form-control" name="num" [(ngModel)]="editGoods.number" disabled></div>
                </div>
                <div class="sec-inline">
                  <div class="sec-inline-title">参团价格</div>
                  <div class="sec-inline-content" *ngIf="status == '未开始'"><input type="text" class="form-control" name="price" [(ngModel)]="activity_price" required></div>
                  <div class="sec-inline-content" *ngIf="status == '进行中'"><input type="text" class="form-control" name="price" [(ngModel)]="activity_price" disabled required></div>
                </div>
                <div class="sec-inline">
                  <div class="sec-inline-title">开团次数</div>
                  <div class="sec-inline-content" *ngIf="status == '未开始'"><input type="number" class="form-control" name="round" min="0" [(ngModel)]="editGoods.round" required></div>
                  <div class="sec-inline-content" *ngIf="status == '进行中'"><input type="number" class="form-control" name="round" min="0" [(ngModel)]="editGoods.round" disabled></div>
                </div><br>
                <div class="sec-inline">
                  <input type="checkbox" [checked]="!!editGoods.new_offer" id="editIsNew" disabled><label for="editIsNew">是否新人参团</label>
                </div>
                <div class="sec-inline" style="display: none">
                  <input type="checkbox" [checked]="!!editGoods.new_open_group" id="editIsNewOpen" disabled><label for="editIsNewOpen">是否新人开团</label>
                </div>
              </div>
            </div>
          </div>
          <div class="line">
            <div class="title">有效期限</div>
            <div class="content">
              <div class="sec-line">
                <div class="sec-inline width-control">
                  <div class="sec-inline-title">开始时间</div>
                  <div class="sec-inline-content" *ngIf="status == '未开始'"><input type="date" class="form-control" name="startTime" placeholder="{{curDate}}" [(ngModel)]="editSpell.start_date" min="{{curDate}}" required></div>
                  <div class="sec-inline-content" *ngIf="status == '进行中'"><input type="date" class="form-control" name="startTime" placeholder="{{curDate}}" [(ngModel)]="editSpell.start_date" min="{{curDate}}" disabled required></div>
                </div>
                <div class="sec-inline width-control">
                  <div class="sec-inline-title">结束时间</div>
                  <div class="sec-inline-content"><input type="date" class="form-control" name="endTime" placeholder="{{curDate}}" [(ngModel)]="editSpell.end_date" min="{{curDate}}" required></div>
                </div>
              </div>
            </div>
          </div>
          <div class="line">
            <div class="title">拼团有效期限</div>
            <div class="content">
              <div class="sec-line">
                <div class="sec-inline">
                  <div class="sec-inline-title">
                    <input type="text" class="form-control input-width" name="validTime" value="24小时" disabled>
                    <span class="prompt">（团长开团以后，在此有效期内，若组团失败，团员支付的钱，需退回）</span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </form>
      <div class="text-center">
        <button class="btn btn-default" [disabled]="!editSpellForm.form.valid||!canClick" (click)="editSpellSubmit()">确 定</button>
        <button class="btn btn-default" (click)="isEditSpell = false;">取 消</button>
      </div>
    </div>

  </div>
  <!--<div class="layout-right" *ngIf="status === '新建拼团'">-->
    <!--<div class="group" [ngClass]="{'active': groupID === 0}" (click)="chooseGroup(0,'全部商品')">全部商品({{allGoodsNum}})</div>-->
    <!--<div class="group" [ngClass]="{'active': groupID === item.id}" *ngFor="let item of groupList"-->
         <!--(click)="chooseGroup(item.id)">{{item.name}}({{item.goodsNum}})<span class="red-circle"-->
                                                                              <!--*ngIf="!!item.recommend"></span>-->
    <!--</div>-->
<!--  </div>-->
</div>

<!-- 新建拼团 -->
<!--<div bsModal #createSpellModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
     aria-labelledby="mySmallModalLabel"
     aria-hidden="true" [config]="{backdrop: 'static'}">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">新建拼团</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="createSpellModal.hide()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form #createSpellForm="ngForm">
          <div class="inline-block name-line">
            <span>活动名称</span>
            <input type="text" name="name" class="form-control" [(ngModel)]="createSpell.name" required>
          </div>
          <div class="item-content">
            <div class="title">规格选择(规格+库存)</div>
            <div class="form-group clearfix">
              <span class="col-md-4 options" *ngFor="let item of goodsSku">
                <input type="checkbox" name="sku" [(ngModel)]="item.selected"><span class="sku_omit" title="{{item.name||item.describe}}">{{item.name||item.describe}}</span>
                <input type="number" name="stock[{{item.id}}]" class="form-control width-control" [(ngModel)]="item.in_stock" max="{{item.in_stock}}" disabled>
              </span>
            </div>
          </div>
          <div class="item-content">
            <div class="title">参团条件设置</div>
            <div class="height-control">
              <div class="form-group clearfix col-md-6">
                <div class="col-md-4 text-right">成团人数</div>
                <div class="col-md-7">
                  <input type="number" class="form-control" name="num" [(ngModel)]="addActivityGoods.number" required>
                </div>
              </div>
              <div class="form-group clearfix col-md-6">
                <div class="col-md-4 text-right">参团价格</div>
                <div class="col-md-7">
                  <input type="number" class="form-control" name="price" [(ngModel)]="activity_price" disabled>
                </div>
              </div>
            </div>
          </div>
          <div class="item-content">
            <div class="title">有效期限</div>
            <div class="height-control">
              <div class="form-group clearfix col-md-6">
                <div class="col-md-4 text-right">开始时间</div>
                <div class="col-md-7">
                  <input type="date" class="form-control" name="startTime" placeholder="2017-10-24" [(ngModel)]="createSpell.start_date" min="{{curDate}}" required>
                </div>
              </div>
              <div class="form-group clearfix col-md-6">
                <div class="col-md-4 text-right">结束时间</div>
                <div class="col-md-7">
                  <input type="date" class="form-control" name="endTime" placeholder="2017-10-24" [(ngModel)]="createSpell.end_date" min="{{curDate}}" required>
                </div>
              </div>
            </div>
          </div>
          <div class="item-content">
            <div class="title">拼团有限期限 <span class="prompt">(团长开团以后，在此有效期内，若组团失败，团员支付的钱，需退回)</span></div>
            <div class="height-control">
              <div class="form-group clearfix col-md-6">
                <div class="col-md-4 text-right">有效期</div>
                <div class="col-md-7">
                  <input type="number" class="form-control auto" name="startTime" value="24" disabled> 小时
                </div>
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="model-footer">
        <button type="submit" class="btn btn-default" (click)="createSpellModal.hide();">取 消</button>
        <button type="button" class="btn btn-default btn-success" [disabled]="!createSpellForm.form.valid" (click)="addOrdinarySpell()">确定</button>
      </div>
    </div>
  </div>
</div>-->

<!-- 添加商品 -->
<div bsModal #addGoodsModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel"
     aria-hidden="true" [config]="{backdrop: 'static'}">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">添加商品</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="addGoodsModal.hide()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <div class="search-line">
          <input type="text" class="form-control" placeholder="按商品名称搜索" name="keyWordDlg" [(ngModel)]="keyWordDlg">
          <select class="form-control" name="groupDlg" [(ngModel)]="groupIdDlg">
            <option value="0">全部商品</option>
            <option *ngFor="let item of groupList" value="{{item.id}}">{{item.name}}</option>
          </select>
          <div class="pull-right">
            <button class="btn btn-default" (click)="searchDlg()">搜索</button>
            <button class="btn" (click)="resetDlg()">重置</button>
          </div>
        </div>
        <div class="table-title">
          <span class="col-md-2">商品分类</span>
          <span class="col-md-2">商品图片</span>
          <span class="col-md-2">商品名称</span>
          <span class="col-md-2">库存量</span>
          <span class="col-md-3">创建时间</span>
          <span class="col-md-1"></span>
        </div>
        <div class="table-items" *ngFor="let item of goodsList">
          <span class="col-md-2 omit"><span class="mr-5" *ngFor="let item2 of item.goods_category">{{item2.name}} </span></span>
          <span class="col-md-2"><img src="{{item.first_picture?aliyunOssOutputUrl+'/'+item.first_picture:''}}" alt=""></span>
          <span class="col-md-2" title="{{item.name}}">{{item.name}}</span>
          <span class="col-md-2">{{item.in_stock}}</span>
          <span class="col-md-3">{{item.created_at}}</span>
          <span class="col-md-1" (click)="checkedGoods(item)"><a href="javascript:;">选择</a></span>
        </div>
      </div>
      <div class="model-footer text-center">
        <pagination (pageChanged)="dlgPageChanged($event)" [totalItems]="totalItemsDlg" [itemsPerPage]="itemsPerPageDlg" [(ngModel)]="currentPageDlg"  [maxSize]="5"
                    previousText="&lsaquo;" nextText="&rsaquo;" firstText="&laquo;" lastText="&raquo;" [boundaryLinks]="true" class="pagination-sm"></pagination>
      </div>
    </div>
  </div>
</div>

<!-- 编辑拼团 -->
<!--<div bsModal #editSpellModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"-->
     <!--aria-labelledby="mySmallModalLabel"-->
     <!--aria-hidden="true" [config]="{backdrop: 'static'}">-->
  <!--<div class="modal-dialog modal-lg">-->
    <!--<div class="modal-content">-->
      <!--<div class="modal-header">-->
        <!--<h4 class="modal-title pull-left">编辑拼团</h4>-->
        <!--<button type="button" class="close pull-right" aria-label="Close" (click)="editSpellModal.hide()">-->
          <!--<span aria-hidden="true">&times;</span>-->
        <!--</button>-->
      <!--</div>-->
      <!--<div class="modal-body">-->
        <!--<form #editSpellForm="ngForm">-->
          <!--<div class="inline-block name-line" *ngIf="status === '未开始'">-->
            <!--<span>活动名称</span>-->
            <!--<input type="text" name="name" class="form-control" [(ngModel)]="editSpell.name" required>-->
          <!--</div>-->

          <!--<div class="inline-block name-line" *ngIf="status === '进行中'">-->
            <!--<span>活动名称</span>-->
            <!--<input type="text" name="name" class="form-control" [(ngModel)]="editSpell.name" disabled>-->
          <!--</div>-->

          <!--<div class="item-content" *ngIf="status === '未开始'">-->
            <!--<div class="title">规格选择</div>-->
            <!--<div>-->
              <!--<div class="title">规格选择(规格+库存)</div>-->
              <!--<div class="form-group clearfix">-->
                <!--<span class="col-md-3 options" *ngFor="let item of goodsSku">-->
                  <!--<input type="checkbox" name="sku" [checked]="item.selected" (change)="item.selected = !item.selected"><span class="sku_omit">{{item.name||item.describe}}</span>-->
                  <!--<input type="text" name="stock" class="form-control" [(ngModel)]="item.in_stock" disabled>-->
                <!--</span>-->
              <!--</div>-->
            <!--</div>-->
          <!--</div>-->

          <!--<div class="item-content" *ngIf="status === '进行中'">-->
            <!--<div class="title">规格选择</div>-->
            <!--<div>-->
              <!--<div class="title">规格选择(规格+库存)</div>-->
              <!--<div class="form-group clearfix">-->
                <!--<span class="col-md-3 options" *ngFor="let item of goodsSku">-->
                  <!--<input type="checkbox" name="sku" [checked]="item.selected" disabled><span class="sku_omit">{{item.name||item.describe}}</span>-->
                  <!--<input type="text" name="stock" class="form-control" [(ngModel)]="item.in_stock" disabled>-->
                <!--</span>-->
              <!--</div>-->
            <!--</div>-->
          <!--</div>-->

          <!--<div class="item-content" *ngIf="status === '未开始'">-->
            <!--<div class="title">参团条件设置</div>-->
            <!--<div class="height-control">-->
              <!--<div class="form-group clearfix col-md-6">-->
                <!--<div class="col-md-3 text-right">成团人数</div>-->
                <!--<div class="col-md-7">-->
                  <!--<input type="number" class="form-control" name="num" [(ngModel)]="editGoods.number" required>-->
                <!--</div>-->
              <!--</div>-->
              <!--<div class="form-group clearfix col-md-6">-->
                <!--<div class="col-md-3 text-right">参团价格</div>-->
                <!--<div class="col-md-7">-->
                  <!--<input type="number" class="form-control" name="price" [(ngModel)]="activity_price" disabled>-->
                <!--</div>-->
              <!--</div>-->
            <!--</div>-->
          <!--</div>-->

          <!--<div class="item-content" *ngIf="status === '进行中'">-->
            <!--<div class="title">参团条件设置</div>-->
            <!--<div class="height-control">-->
              <!--<div class="form-group clearfix col-md-6">-->
                <!--<div class="col-md-3 text-right">成团人数</div>-->
                <!--<div class="col-md-7">-->
                  <!--<input type="number" class="form-control" name="num" [(ngModel)]="editGoods.number" disabled>-->
                <!--</div>-->
              <!--</div>-->
              <!--<div class="form-group clearfix col-md-6">-->
                <!--<div class="col-md-3 text-right">参团价格</div>-->
                <!--<div class="col-md-7">-->
                  <!--<input type="number" class="form-control" name="price" [(ngModel)]="activity_price" disabled>-->
                <!--</div>-->
              <!--</div>-->
            <!--</div>-->
          <!--</div>-->

          <!--<div class="item-content"  *ngIf="status === '未开始'">-->
            <!--<div class="title">有效期限</div>-->
            <!--<div class="height-control">-->
              <!--<div class="form-group clearfix col-md-6">-->
                <!--<div class="col-md-3 text-right">开始时间</div>-->
                <!--<div class="col-md-7">-->
                  <!--<input type="date" class="form-control" name="startTime" [(ngModel)]="editSpell.start_date" required>-->
                <!--</div>-->
              <!--</div>-->
              <!--<div class="form-group clearfix col-md-6">-->
                <!--<div class="col-md-3 text-right">结束时间</div>-->
                <!--<div class="col-md-7">-->
                  <!--<input type="date" class="form-control" name="endTime" [(ngModel)]="editSpell.end_date" required>-->
                <!--</div>-->
              <!--</div>-->
            <!--</div>-->
          <!--</div>-->

          <!--<div class="item-content"  *ngIf="status === '进行中'">-->
            <!--<div class="title">有效期限</div>-->
            <!--<div class="height-control">-->
              <!--<div class="form-group clearfix col-md-6">-->
                <!--<div class="col-md-3 text-right">开始时间</div>-->
                <!--<div class="col-md-7">-->
                  <!--<input type="date" class="form-control" name="startTime" [(ngModel)]="editSpell.start_date" disabled>-->
                <!--</div>-->
              <!--</div>-->
              <!--<div class="form-group clearfix col-md-6">-->
                <!--<div class="col-md-3 text-right">结束时间</div>-->
                <!--<div class="col-md-7">-->
                  <!--<input type="date" class="form-control" name="endTime" [(ngModel)]="editSpell.end_date" required>-->
                <!--</div>-->
              <!--</div>-->
            <!--</div>-->
          <!--</div>-->

          <!--<div class="item-content">-->
            <!--<div class="title">拼团有限期限 <span class="prompt">(团长开团以后，在此有效期内，若组团失败，团员支付的钱，需退回)</span></div>-->
            <!--<div class="height-control">-->
              <!--<div class="form-group clearfix col-md-6">-->
                <!--<div class="col-md-3 text-right">有效期</div>-->
                <!--<div class="col-md-7">-->
                  <!--<input type="number" class="form-control auto" name="startTime" value="24" disabled> 小时-->
                <!--</div>-->
              <!--</div>-->
            <!--</div>-->
          <!--</div>-->
        <!--</form>-->
      <!--</div>-->
      <!--<div class="model-footer">-->
        <!--<button type="submit" class="btn btn-default" (click)="editSpellModal.hide();">取 消</button>-->
        <!--<button type="button" class="btn btn-success" [disabled]="!editSpellForm.form.valid" (click)="editSpellSubmit()">确定</button>-->
      <!--</div>-->
    <!--</div>-->
  <!--</div>-->
<!--</div>-->

<!-- 是否确认删除弹框 -->
<div class="modal fade" bsModal #delModal="bs-modal" tabindex="-1">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">提示</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="delModal.hide()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body text-center">
        是否确认删除
      </div>
      <div class="modal-footer mt20">
        <button class="btn btn-default btn-md-long" type="button" (click)="delModal.hide()">取消</button>
        <button class="btn btn-success btn-md-long" type="submit" (click)="submitDelActivity()">确定</button>
      </div>
    </div>
  </div>
</div>

<!-- 是否确认暂停/恢复活动弹框 -->
<div class="modal fade" bsModal #changeStatusModal="bs-modal" tabindex="-1">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">提示</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="changeStatusModal.hide()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body text-center" *ngIf="activityStatus === '正常'">
        暂停以后，该商品将不在货架上显示，确定要暂停活动吗？
      </div>
      <div class="modal-body text-center" *ngIf="activityStatus === '暂停'">
        确定要恢复活动吗？
      </div>
      <div class="modal-footer mt20">
        <button class="btn btn-default btn-md-long" type="button" (click)="changeStatusModal.hide()">取消</button>
        <button class="btn btn-success btn-md-long" type="submit" (click)="confirmChangeStatus()">确定</button>
      </div>
    </div>
  </div>
</div>

<app-notification [type]="type" [message]="message" [isShow]="isShow"
                  (promptIsShow)="isShow = $event;"></app-notification>
